package org.Vancl.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.Vancl.Dao.ShoppingCarDao;
import org.Vancl.Dao.ImpI.ShoppingCarDaoImpI;
@WebServlet(urlPatterns="/ShoppingCarDel.Shtml")
public class ShoppingCarDelServlet extends HttpServlet {
		@Override
		protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
			String delid=req.getParameter("delid");
			ShoppingCarDao shoppingCarDao=new ShoppingCarDaoImpI();
			int rs=shoppingCarDao.delShopping(Integer.parseInt(delid));
			if(rs>0) {
				req.getRequestDispatcher("/ShoppingCar.shtml").forward(req, resp);
			}
		}
		@Override
		protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
			// TODO Auto-generated method stub
			super.doPost(req, resp);
		}
		
}
